/*
 * @version: 1.0
 * @Author: zhl
 * @Date: 2021-09-01 13:35:19
 * @LastEditors: zhl
 * @LastEditTime: 2021-09-30 08:56:07
 * @Description: file content
 */

#ifndef __SERVER_APDU_H__
#define __SERVER_APDU_H__

#include <stdint.h>
#include "GET-Response.h"

typedef enum _SERVER_APDU_TAG{
    SERVER_CONNECT_RESPONSE     = 130,    //建立应用连接响应
    SERVER_RELEASE_RESPONSE     = 131,    //断开应用连接响应
    SERVER_RELEASE_NOTIFICATION = 132,    //断开应用连接通知
    SERVER_GET_RESPONSE         = 133,    //读取响应
    SERVER_SET_RESPONSE         = 134,    //设置响应
    SERVER_ACTION_RESPONSE      = 135,    //操作响应
    SERVER_REPORT_NOTIFICATION  = 136,    //上报通知
    SERVER_PROXY_RESPONSE       = 137,    //代理响应
    SERVER_ERROR_RESPONSE       = 238     //异常响应
}SERVER_APDU_TAG;


class Server_APDU{
    public:
        Server_APDU();
        ~Server_APDU();

        int parse_apdu(int64_t dev_id, uint8_t *apdu, int len, std::list<Data> &result);
        
        static Server_APDU &getInstance();

    private:
        static Server_APDU c_instance;

};






#endif /* __SERVER_APDU_H__ */